package ic.symbols;

import common.exceptions.SemanticError;
import ic.ast.decl.DeclClass;
import ic.types.TypeTable;

/**
 * Created with IntelliJ IDEA.
 * User: Matan
 * Date: 12/10/13
 * Time: 11:19 AM
 */
public class ClassSymbol extends Symbol {

    public ClassSymbol(DeclClass cl) throws SemanticError {
        super(cl.getName(), SymbolType.CLASS, cl.getLine());
        TypeTable.addDeclClass(cl);
    }

    public String toString() {
        StringBuilder str = new StringBuilder();
        str.append("Class:  ");
        str.append(getID());
        return str.toString();
    }
}

